{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Cloning Content"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Introduction"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "One request the Python API team has heard repeatedly from Web GIS administrators: What's the best way to move my content from a development Enterprise or organization to staging to production?\n",
    "\n",
    "This Guide provides one possible roadmap for how to get content from one Web GIS to another - a template for demonstrating basic software concepts when transferring content so the workflow can be modified for other types of content and tailored for an administrator's particular need. \n",
    "\n",
    "The [`clone_items()`](https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#arcgis.gis.ContentManager.clone_items) function on the ContentManger aims to create an exact duplicate of one item with all its uses and functionality from an original organizational deployment, whether ArcGIS Online, Enteprise, or Kubernetes to a second organizational deployment. The relationship between any supported, related, or resource items to the items being cloned must be considered when cloning an item. \n",
    "\n",
    "When talking about cloning items, let's establish some basic terminology.  Cloning can refer to the transfer of items between any organizational deployment, from either ArcGIS Enterprise, ArcGIS Online, or ArcGIS Enterprise for Kubernetes to any other deployment type. Rather than tangling ourselves up when trying to distinguish between these portal types while writing about them, we'll refer to organization where the content originates as the _source_ regardless of deployment type. We'll consider the organization to which we'll clone content as the _target_. \n",
    "\n",
    "This document illustrates the workflow of gathering _source_ items using a source administrator account, and cloning them into a _target_ administrator account.  More specifically, this guide walks through an approach of cloning [`hosted feature layers`](https://doc.arcgis.com/en/arcgis-online/manage-data/hosted-web-layers.htm) and [`web maps`](https://developers.arcgis.com/documentation/core-concepts/web-maps/). `Web Maps` can consume these layer items and their source services as operational layer building blocks. For information on each of these item types, please click the hyperlinks for each type.\n",
    "\n",
    "This is an administrator workflow. Using administrator accounts guarantees all necessary privileges within the _source_ to access the item and any dependencies and within the _target_ to create the services and items. The target administrator subsequently can create user accounts and reassign item ownership and/or group membership according to need. This might also be the simplest workflow when the portal has users managed by an external identity store."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Supported Items"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "As originally written, Python API developers designed the `clone_items()` function for transferring the following item types:\n",
    " * Hosted Web Applications built with Web AppBuilder or shared using Configurable App Templates\n",
    " * Web Maps\n",
    " * Hosted Feature Layers\n",
    " * Hosted Feature Layer Views\n",
    " * Feature Collections\n",
    " * Survey123 Forms\n",
    " * Workforce Projects\n",
    " * StoryMaps\n",
    "   * See [Cloning Complex Items](../cloning-complex-apps)\n",
    " * Operation Views\n",
    " * Dashboards\n",
    "   * See [Cloning Complex Apps](../cloning-complex-apps)\n",
    " * QuickCapture Projects\n",
    " * ArcGIS Notebooks \n",
    " * Simple Types\n",
    "   * Those items with a download option (see [Data files](https://developers.arcgis.com/rest/users-groups-and-items/items-and-item-types.htm) for items that may be in a Web GIS and available for download), including zipped file geodatabases and shapefiles, code samples, zip files, and packages amongst others.\n",
    "\n",
    "`clone_items()` clones the dependencies for the more complex items listed above. For example, cloning an existing web application, clones the web map and all hosted feature layers referenced in the map.\n",
    "\n",
    "`clone_items()` will not clone map services and image services. Since these services can be published to servers other than the hosted server in a configuration, it's impossible for the function to determine where to publish them in the target. As a result, these items will copy over, but will continue to point back to the original source URL. "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's work through examples of cloning individual items and inspect the results.\n",
    "\n",
    "\n",
    "First, let's import the necessary libraries and connect to our source and target GIS:"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Import libraries"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from pathlib import Path\n",
    "import sys\n",
    "import pandas as pd\n",
    "\n",
    "from arcgis.gis import GIS, Item\n",
    "from arcgis.env import active_gis\n",
    "from arcgis.features import FeatureLayerCollection\n",
    "from arcgis.map import Map"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Connect to source and target portals"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's start from a discovery position as an administrator. We'll simulate an administrator who's been testing and developing using an [ArcGIS Online](https://doc.arcgis.com/en/arcgis-online/get-started/what-is-agol.htm) deployment as a development environment and wants to clone items into an on-premise [ArcGIS Enterprise](https://enterprise.arcgis.com/en/get-started/latest/windows/what-is-arcgis-enterprise-.htm) for further development."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "GIS @ https://geosaurus.maps.arcgis.com version:2025.2\n"
     ]
    }
   ],
   "source": [
    "source = GIS(profile=\"your_online_admin_profile\")\n",
    "print(source)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "GIS @ https://geosaurus.maps.arcgis.com version:2025.2\n"
     ]
    }
   ],
   "source": [
    "target = GIS(profile=\"your_online_api_data_owner_profile\")\n",
    "print(target)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Get started with cloning\n",
    "\n",
    "Let's start with an immediate demonstration of what `clone_items()` can do. We're logged in as an administrator and we'll `get()` a specific hosted feature layer item owned by one of the users in the _source_. We'll then clone it into the _target_ while utilizing the `owner` parameter to specify a particular `User` in the _target_ to own the cloned content. We can quickly examine the resulting `url` of the cloned feature layer to confirm the new item."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div class=\"item_container\" style=\"height: auto; overflow: hidden; border: 1px solid #cfcfcf; border-radius: 2px; background: #f6fafa; line-height: 1.21429em; padding: 10px;\">\n",
       "                    <div class=\"item_left\" style=\"width: 210px; float: left;\">\n",
       "                       <a href='https://geosaurus.maps.arcgis.com/home/item.html?id=3213ff60f81c46a0a970ec31dde368ac' target='_blank'>\n",
       "                        <img src='' width='200' height='133' class=\"itemThumbnail\">\n",
       "                       </a>\n",
       "                    </div>\n",
       "\n",
       "                    <div class=\"item_right\"     style=\"float: none; width: auto; overflow: hidden;\">\n",
       "                        <a href='https://geosaurus.maps.arcgis.com/home/item.html?id=3213ff60f81c46a0a970ec31dde368ac' target='_blank'><b>Arkansas Hospitals</b>\n",
       "                        </a>\n",
       "                        <br/>This data provides the Hospital information for the State of Arkansas to track disease related data in a mapping environment, and to do so in a way that electronic map information can be transmitted quickly and efficiently to those in the public health network. The database provides location information for use in local and regional cartographic and spatial analysis applications. It is the intention of the Arkansas State Land Information Board to facilitate dissemination of public data.<img src='https://geosaurus.maps.arcgis.com/home/js/jsapi/esri/css/images/item_type_icons/featureshosted16.png' style=\"vertical-align:middle;\" width=16 height=16>Feature Layer Collection by api_data_owner\n",
       "                        <br/>Last Modified: January 25, 2024\n",
       "                        <br/>0 comments, 105 views\n",
       "                    </div>\n",
       "                </div>\n",
       "                "
      ],
      "text/plain": [
       "<Item title:\"Arkansas Hospitals\" type:Feature Layer Collection owner:api_data_owner>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "hosted_flyr = source.content.get(\"3213ff60f81c46a0a970ec31dde368ac\")\n",
    "hosted_flyr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'https://services7.arcgis.com/JEwYeAy2cc8qOe3o/arcgis/rest/services/Arkansas_Hospitals/FeatureServer'"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "hosted_flyr.url"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "cloned_flyr = target.content.clone_items(items=[hosted_flyr],\n",
    "                                         owner=\"api_data_owner\",\n",
    "                                         folder=\"cloning_guide\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div class=\"item_container\" style=\"height: auto; overflow: hidden; border: 1px solid #cfcfcf; border-radius: 2px; background: #f6fafa; line-height: 1.21429em; padding: 10px;\">\n",
       "                    <div class=\"item_left\" style=\"width: 210px; float: left;\">\n",
       "                       <a href='https://pythonapi.playground.esri.com/portal/home/item.html?id=815af129522849b89ec2e3735bc0c480' target='_blank'>\n",
       "                        <img src='' width='200' height='133' class=\"itemThumbnail\">\n",
       "                       </a>\n",
       "                    </div>\n",
       "\n",
       "                    <div class=\"item_right\"     style=\"float: none; width: auto; overflow: hidden;\">\n",
       "                        <a href='https://pythonapi.playground.esri.com/portal/home/item.html?id=815af129522849b89ec2e3735bc0c480' target='_blank'><b>Arkansas Hospitals</b>\n",
       "                        </a>\n",
       "                        <br/>This data provides the Hospital information for the State of Arkansas to track disease related data in a mapping environment, and to do so in a way that electronic map information can be transmitted quickly and efficiently to those in the public health network. The database provides location information for use in local and regional cartographic and spatial analysis applications. It is the intention of the Arkansas State Land Information Board to facilitate dissemination of public data.<img src='https://pythonapi.playground.esri.com/portal/home/js/jsapi/esri/css/images/item_type_icons/featureshosted16.png' style=\"vertical-align:middle;\" width=16 height=16>Feature Layer Collection by api_data_owner\n",
       "                        <br/>Last Modified: February 20, 2024\n",
       "                        <br/>0 comments, 1 views\n",
       "                    </div>\n",
       "                </div>\n",
       "                "
      ],
      "text/plain": [
       "<Item title:\"Arkansas Hospitals\" type:Feature Layer Collection owner:api_data_owner>"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cloned_flyr[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'https://pythonapi.playground.esri.com/server/rest/services/Hosted/Arkansas_Hospitals/FeatureServer'"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cloned_flyr[0].url"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can see that the `clone_items()` function returns a list containing the cloned items. Indexing the list we can see the operation created a new hosted feature layer in the _target_ organization owned by the `api_data_owner` user we entered as the `owner` argument. "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Cloning multiple items simultaneously\n",
    "\n",
    "We demonstrated above passing one item in the `items` parameter list. Now let's see how `clone_items()` will clone every item in the list. First let's [`search()`](https://developers.arcgis.com/python/api-reference/arcgis.gis.toc.html#arcgis.gis.ContentManager.search) the _source_ function for items owned by a particular user and clone the list items into our _target_ all at the same time."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<Item title:\"Earthquake Damage Map\" type:Web Map owner:api_data_owner>,\n",
       " <Item title:\"earthquakes_2\" type:CSV owner:api_data_owner>,\n",
       " <Item title:\"earthquakes_sample_data\" type:CSV owner:api_data_owner>,\n",
       " <Item title:\"earthquakes_2\" type:Feature Layer Collection owner:api_data_owner>]"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tester_content = source.content.search(f\"tags:disaster_testing AND owner:api_data_owner\")\n",
    "tester_content"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "cloned_items = target.content.clone_items(items=tester_content, \n",
    "                                          folder=output_folder.name)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<Item title:\"earthquakes_2\" type:Feature Layer Collection owner:api_data_owner>,\n",
       " <Item title:\"earthquakes_2\" type:CSV owner:api_data_owner>,\n",
       " <Item title:\"earthquakes_sample_data\" type:CSV owner:api_data_owner>,\n",
       " <Item title:\"Earthquake Damage Map\" type:Web Map owner:api_data_owner>]"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cloned_items"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can see that the `clone_items()` function cloned all the items in the list we passed to the `items` argument. We can also see that by not passing in an `owner` argument, the items are owned by the logged in user that ran `clone_items()`."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'api_data_owner'"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "target.users.me.username"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "There's a quick demonstration of how the `clone_items()` function replicates items from a _source_ to a _target_. Now let's move onto iterating through a list of hosted feature layers and working with some additonal parameters to clone information products that consume them."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## The cloning process\n",
    "A very important parameter in the `clone_items()` function impacts its output:\n",
    " \n",
    " * `search_existing_items` - The possible values are `True` or `False`.  \n",
    " \n",
    "The default value is `True`. Let's describe what happens when the value is set to `True`. When any _source_ `item` is cloned into the _target_, the `clone_items()` function assigns the cloned `item` all the essential item type [`typeKeywords`](https://developers.arcgis.com/rest/users-groups-and-items/items-and-item-types.htm) (See hyperlink for `typeKeywords`automatically assigned to items) plus an additional typeKeyword of `source-<source_item_id_value>`. For example, if `clone_items()` clones a feature layer item from _source_ item `item id` `d879c7d972b1d989b97d037c7a7737d6`, the resulting feature layer item in the _target_ will have a `typeKeyword` of `source-d879c7d972b1d989b97d037c7a7737d6` in addition to all essential `typeKeywords`. Before any actual clone, `clone_items()` searches the _target_ for any item with a `typeKeyword` matching that pattern and if it finds one uses the existing _target_ item rather than cloning the item again.\n",
    "\n",
    "If the argument is set to `False`, the specified item(s) and its dependent items will be cloned into the _target_ no matter whether they already exist."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Web Maps"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can create a list of the web map items using the [advanced_search()](/python/api-reference/arcgis.gis.toc.html#arcgis.gis.ContentManager.advanced_search) method. First we'll get a list of all items, and then convert it to a Pandas DataFrame to filter out for our web maps:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Get all items owned by the user\n",
    "owner_items = source.content.advanced_search(query=f\"owner:{source.users.me.username}\", \n",
    "                                             max_items=-1)[\"results\"]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Convert list to a Pandas DataFrame\n",
    "owner_items_df = pd.DataFrame(owner_items)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Use Pandas `groupby()` to create individual group objects of each item type owned by the user.  Then use the `get_group()` method to return all the Web Maps."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>owner</th>\n",
       "      <th>orgId</th>\n",
       "      <th>created</th>\n",
       "      <th>isOrgItem</th>\n",
       "      <th>modified</th>\n",
       "      <th>guid</th>\n",
       "      <th>name</th>\n",
       "      <th>title</th>\n",
       "      <th>type</th>\n",
       "      <th>...</th>\n",
       "      <th>apiToken1ExpirationDate</th>\n",
       "      <th>apiToken2ExpirationDate</th>\n",
       "      <th>contentOrigin</th>\n",
       "      <th>lastViewed</th>\n",
       "      <th>size</th>\n",
       "      <th>commentsEnabled</th>\n",
       "      <th>itemControl</th>\n",
       "      <th>layers</th>\n",
       "      <th>tables</th>\n",
       "      <th>contentStatus</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1147</th>\n",
       "      <td>935b9032e6c8492ebcd5ff3d9c8131e9</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1685983591000</td>\n",
       "      <td>True</td>\n",
       "      <td>1685983595000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>Case 02773785 220 Mbs</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1750683600000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1160</th>\n",
       "      <td>549169f28ce9424d94f7c5f237d33840</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1607547954000</td>\n",
       "      <td>True</td>\n",
       "      <td>1612904683000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>Chicago_Libraries_High_Checkout</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1750683600000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1345</th>\n",
       "      <td>b365a799efc34fc7b1b286c06c019b3a</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1754003328000</td>\n",
       "      <td>True</td>\n",
       "      <td>1754003328000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>dnk_map</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1756936800000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1410</th>\n",
       "      <td>0c787e9cba574a5eb773c9846d90a8c6</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1654023844000</td>\n",
       "      <td>True</td>\n",
       "      <td>1654023844000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>erase_me_map</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1744761600000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1411</th>\n",
       "      <td>8596074ae0af45039ec50e86c83b17e0</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1656553353000</td>\n",
       "      <td>True</td>\n",
       "      <td>1656553353000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>erase_me_map</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1744761600000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1412</th>\n",
       "      <td>55f662afe71145fcbf107e783710c0bf</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1656553356000</td>\n",
       "      <td>True</td>\n",
       "      <td>1656553356000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>erase_me_map</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1728936000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1413</th>\n",
       "      <td>3f7a064e12254f6b80a3f9179b37b8b7</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1656553355000</td>\n",
       "      <td>True</td>\n",
       "      <td>1656553355000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>erase_me_map</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1728936000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1414</th>\n",
       "      <td>dde150ba99454b00895225d06bdc7473</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1654023846000</td>\n",
       "      <td>True</td>\n",
       "      <td>1654023846000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>erase_me_map</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1728936000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1415</th>\n",
       "      <td>21f421cb5817471ab65185a53febc8ab</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1654023843000</td>\n",
       "      <td>True</td>\n",
       "      <td>1654023843000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>erase_me_map</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1728936000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1462</th>\n",
       "      <td>62f50f03e1c846d9a547c0480dc768e0</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1684115932000</td>\n",
       "      <td>True</td>\n",
       "      <td>1684115935000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>Giraffes</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1728936000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1463</th>\n",
       "      <td>6d8e89f6fb0a4c8a8bb5e059846425d9</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1601408274000</td>\n",
       "      <td>True</td>\n",
       "      <td>1684115692000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>Giraffes Original</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1754067600000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1465</th>\n",
       "      <td>ff0361d75c494f77a4959c959201b998</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1709422836000</td>\n",
       "      <td>True</td>\n",
       "      <td>1709423741000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>HIFLD Hospital Locations</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1753286400000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1481</th>\n",
       "      <td>658e09e0c0cf415aa4bea0047195108d</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1743008654000</td>\n",
       "      <td>True</td>\n",
       "      <td>1743008654000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>KG_Quick_Capture</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1744858800000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1483</th>\n",
       "      <td>85c3d6a0ac594f71b4e67ea79c05f184</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1723827682000</td>\n",
       "      <td>True</td>\n",
       "      <td>1723828093000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>Leaf Pickup Popup Test</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1728936000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1490</th>\n",
       "      <td>bc2e103d1c81422bb117a2a6f2491db3</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1573859849000</td>\n",
       "      <td>True</td>\n",
       "      <td>1573859860000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>mult_lyr_webmap</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1744761600000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1997</th>\n",
       "      <td>e4ba5816764748f1b36ead1a1327c37f</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1692895691000</td>\n",
       "      <td>True</td>\n",
       "      <td>1693252353000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>set1_cities_webmap</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1728936000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2263</th>\n",
       "      <td>31b5a9cc00d84407894aaf75cb474514</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1737475928000</td>\n",
       "      <td>True</td>\n",
       "      <td>1737475928000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>Time stamp: 2025_1_21_17_11_37</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1753286400000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2265</th>\n",
       "      <td>1ccb65d6c6a14f25adb4e2cf34c53f51</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1737475927000</td>\n",
       "      <td>True</td>\n",
       "      <td>1737475928000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>Time stamp: 2025_1_21_17_11_37 Dispatcher Map</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1744761600000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2266</th>\n",
       "      <td>a49eabc793814b6ca65eb0dd746808a0</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1737475994000</td>\n",
       "      <td>True</td>\n",
       "      <td>1737475995000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>Time stamp: 2025_1_21_17_12_38</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1750683600000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2268</th>\n",
       "      <td>c9fc524a0e1b44549bc4c3236d94df01</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1737475994000</td>\n",
       "      <td>True</td>\n",
       "      <td>1737475995000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>Time stamp: 2025_1_21_17_12_38 Dispatcher Map</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>-1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2269</th>\n",
       "      <td>4c22a07ee1764a15ad808755843c82a7</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1737477965000</td>\n",
       "      <td>True</td>\n",
       "      <td>1737477965000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>Time stamp: 2025_1_21_17_45_24</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1750683600000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2271</th>\n",
       "      <td>e6e14f068c804831bd97fa214beecec8</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1737477963000</td>\n",
       "      <td>True</td>\n",
       "      <td>1737477964000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>Time stamp: 2025_1_21_17_45_24 Dispatcher Map</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1750683600000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2272</th>\n",
       "      <td>dbcd5d035a3c48b6ac6899079bb2b68d</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1737478026000</td>\n",
       "      <td>True</td>\n",
       "      <td>1737478027000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>Time stamp: 2025_1_21_17_46_37</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1744761600000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2273</th>\n",
       "      <td>5741f0cd54684aaaa5555ba530dbf031</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1737478025000</td>\n",
       "      <td>True</td>\n",
       "      <td>1737478026000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>Time stamp: 2025_1_21_17_46_37 Dispatcher Map</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>-1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2275</th>\n",
       "      <td>c1aeb94d26494d959076acc343d62c4a</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1737478122000</td>\n",
       "      <td>True</td>\n",
       "      <td>1737478123000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>Time stamp: 2025_1_21_17_48_10</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1744761600000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2276</th>\n",
       "      <td>fa23b8c765db4078b0b67c795527adff</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1737478121000</td>\n",
       "      <td>True</td>\n",
       "      <td>1737478122000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>Time stamp: 2025_1_21_17_48_10 Dispatcher Map</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>-1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2277</th>\n",
       "      <td>cea1ee09715b4a3b91bb19d14abf8266</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1737475866000</td>\n",
       "      <td>True</td>\n",
       "      <td>1737475866000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>Time stamp: 2025_1_21_17_9_45</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1744761600000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2279</th>\n",
       "      <td>e4ac0aa340d846aea9f6056876f0a7bd</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1737475865000</td>\n",
       "      <td>True</td>\n",
       "      <td>1737475866000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>Time stamp: 2025_1_21_17_9_45 Dispatcher Map</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1744761600000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2281</th>\n",
       "      <td>ab00598e5d4049b2b4431231fcca2a7e</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1750803035000</td>\n",
       "      <td>True</td>\n",
       "      <td>1750803104000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>Time stamp: 2025_6_24_15_10_11</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1753286400000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2282</th>\n",
       "      <td>e16ef566feac455686ff00e59c324d18</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1750803035000</td>\n",
       "      <td>True</td>\n",
       "      <td>1750803103000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>Time stamp: 2025_6_24_15_10_11 Dispatcher Map</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1750802400000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2283</th>\n",
       "      <td>22082b26fc4b4cb4b6a7b41ac46a70ec</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1750803363000</td>\n",
       "      <td>True</td>\n",
       "      <td>1750803417000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>Time stamp: 2025_6_24_15_15_39</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1750802400000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2285</th>\n",
       "      <td>1e6a34664fe44ef09ed2a524dfe637cf</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1750803362000</td>\n",
       "      <td>True</td>\n",
       "      <td>1750803416000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>Time stamp: 2025_6_24_15_15_39 Dispatcher Map</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1750802400000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2286</th>\n",
       "      <td>c68dd1afb54841f1b9782f6bfb802d7b</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1750802975000</td>\n",
       "      <td>True</td>\n",
       "      <td>1750802976000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>Time stamp: 2025_6_24_15_9_10</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>-1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2288</th>\n",
       "      <td>5b6885b632c44252aa83ea75f2b35131</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1750802975000</td>\n",
       "      <td>True</td>\n",
       "      <td>1750802976000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>Time stamp: 2025_6_24_15_9_10 Dispatcher Map</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>-1</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2293</th>\n",
       "      <td>061b561058484cbda73eea08dffe43bf</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1698259114000</td>\n",
       "      <td>True</td>\n",
       "      <td>1698259116000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>UC Location</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1744761600000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2294</th>\n",
       "      <td>6b1f7ea22e2543aa9849e34097d05570</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1708463115000</td>\n",
       "      <td>True</td>\n",
       "      <td>1708463115000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>US Power Plant Data</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1752264000000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2297</th>\n",
       "      <td>2829cb17770c4dd5828f3513ea9181e0</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1723840528000</td>\n",
       "      <td>True</td>\n",
       "      <td>1738787019000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>USA time zones and traffic counts WebMap</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1741903200000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2305</th>\n",
       "      <td>437df2865e0f4147853a98d883d93c13</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1582579501000</td>\n",
       "      <td>True</td>\n",
       "      <td>1582590674000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>Vietnam for Testing</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1754002800000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2310</th>\n",
       "      <td>8179a6db6b3744f197ad1ae0663e6da4</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1750865389000</td>\n",
       "      <td>True</td>\n",
       "      <td>1750865429000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>Workforce-Ntgrtn-tst: 2025_6_25_11_29_25</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1753286400000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2311</th>\n",
       "      <td>4196d87246444a088d23832e66732930</td>\n",
       "      <td>ArcGISPyAPIBot</td>\n",
       "      <td>JEwYeAy2cc8qOe3o</td>\n",
       "      <td>1750865388000</td>\n",
       "      <td>True</td>\n",
       "      <td>1750865428000</td>\n",
       "      <td>None</td>\n",
       "      <td>None</td>\n",
       "      <td>Workforce-Ntgrtn-tst: 2025_6_25_11_29_25 Dispa...</td>\n",
       "      <td>Web Map</td>\n",
       "      <td>...</td>\n",
       "      <td>-1</td>\n",
       "      <td>-1</td>\n",
       "      <td>self</td>\n",
       "      <td>1750863600000</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>40 rows × 54 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                    id           owner             orgId  \\\n",
       "1147  935b9032e6c8492ebcd5ff3d9c8131e9  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "1160  549169f28ce9424d94f7c5f237d33840  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "1345  b365a799efc34fc7b1b286c06c019b3a  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "1410  0c787e9cba574a5eb773c9846d90a8c6  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "1411  8596074ae0af45039ec50e86c83b17e0  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "1412  55f662afe71145fcbf107e783710c0bf  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "1413  3f7a064e12254f6b80a3f9179b37b8b7  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "1414  dde150ba99454b00895225d06bdc7473  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "1415  21f421cb5817471ab65185a53febc8ab  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "1462  62f50f03e1c846d9a547c0480dc768e0  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "1463  6d8e89f6fb0a4c8a8bb5e059846425d9  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "1465  ff0361d75c494f77a4959c959201b998  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "1481  658e09e0c0cf415aa4bea0047195108d  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "1483  85c3d6a0ac594f71b4e67ea79c05f184  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "1490  bc2e103d1c81422bb117a2a6f2491db3  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "1997  e4ba5816764748f1b36ead1a1327c37f  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "2263  31b5a9cc00d84407894aaf75cb474514  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "2265  1ccb65d6c6a14f25adb4e2cf34c53f51  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "2266  a49eabc793814b6ca65eb0dd746808a0  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "2268  c9fc524a0e1b44549bc4c3236d94df01  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "2269  4c22a07ee1764a15ad808755843c82a7  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "2271  e6e14f068c804831bd97fa214beecec8  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "2272  dbcd5d035a3c48b6ac6899079bb2b68d  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "2273  5741f0cd54684aaaa5555ba530dbf031  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "2275  c1aeb94d26494d959076acc343d62c4a  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "2276  fa23b8c765db4078b0b67c795527adff  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "2277  cea1ee09715b4a3b91bb19d14abf8266  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "2279  e4ac0aa340d846aea9f6056876f0a7bd  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "2281  ab00598e5d4049b2b4431231fcca2a7e  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "2282  e16ef566feac455686ff00e59c324d18  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "2283  22082b26fc4b4cb4b6a7b41ac46a70ec  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "2285  1e6a34664fe44ef09ed2a524dfe637cf  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "2286  c68dd1afb54841f1b9782f6bfb802d7b  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "2288  5b6885b632c44252aa83ea75f2b35131  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "2293  061b561058484cbda73eea08dffe43bf  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "2294  6b1f7ea22e2543aa9849e34097d05570  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "2297  2829cb17770c4dd5828f3513ea9181e0  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "2305  437df2865e0f4147853a98d883d93c13  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "2310  8179a6db6b3744f197ad1ae0663e6da4  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "2311  4196d87246444a088d23832e66732930  ArcGISPyAPIBot  JEwYeAy2cc8qOe3o   \n",
       "\n",
       "            created  isOrgItem       modified  guid  name  \\\n",
       "1147  1685983591000       True  1685983595000  None  None   \n",
       "1160  1607547954000       True  1612904683000  None  None   \n",
       "1345  1754003328000       True  1754003328000  None  None   \n",
       "1410  1654023844000       True  1654023844000  None  None   \n",
       "1411  1656553353000       True  1656553353000  None  None   \n",
       "1412  1656553356000       True  1656553356000  None  None   \n",
       "1413  1656553355000       True  1656553355000  None  None   \n",
       "1414  1654023846000       True  1654023846000  None  None   \n",
       "1415  1654023843000       True  1654023843000  None  None   \n",
       "1462  1684115932000       True  1684115935000  None  None   \n",
       "1463  1601408274000       True  1684115692000  None  None   \n",
       "1465  1709422836000       True  1709423741000  None  None   \n",
       "1481  1743008654000       True  1743008654000  None  None   \n",
       "1483  1723827682000       True  1723828093000  None  None   \n",
       "1490  1573859849000       True  1573859860000  None  None   \n",
       "1997  1692895691000       True  1693252353000  None  None   \n",
       "2263  1737475928000       True  1737475928000  None  None   \n",
       "2265  1737475927000       True  1737475928000  None  None   \n",
       "2266  1737475994000       True  1737475995000  None  None   \n",
       "2268  1737475994000       True  1737475995000  None  None   \n",
       "2269  1737477965000       True  1737477965000  None  None   \n",
       "2271  1737477963000       True  1737477964000  None  None   \n",
       "2272  1737478026000       True  1737478027000  None  None   \n",
       "2273  1737478025000       True  1737478026000  None  None   \n",
       "2275  1737478122000       True  1737478123000  None  None   \n",
       "2276  1737478121000       True  1737478122000  None  None   \n",
       "2277  1737475866000       True  1737475866000  None  None   \n",
       "2279  1737475865000       True  1737475866000  None  None   \n",
       "2281  1750803035000       True  1750803104000  None  None   \n",
       "2282  1750803035000       True  1750803103000  None  None   \n",
       "2283  1750803363000       True  1750803417000  None  None   \n",
       "2285  1750803362000       True  1750803416000  None  None   \n",
       "2286  1750802975000       True  1750802976000  None  None   \n",
       "2288  1750802975000       True  1750802976000  None  None   \n",
       "2293  1698259114000       True  1698259116000  None  None   \n",
       "2294  1708463115000       True  1708463115000  None  None   \n",
       "2297  1723840528000       True  1738787019000  None  None   \n",
       "2305  1582579501000       True  1582590674000  None  None   \n",
       "2310  1750865389000       True  1750865429000  None  None   \n",
       "2311  1750865388000       True  1750865428000  None  None   \n",
       "\n",
       "                                                  title     type  ...  \\\n",
       "1147                              Case 02773785 220 Mbs  Web Map  ...   \n",
       "1160                    Chicago_Libraries_High_Checkout  Web Map  ...   \n",
       "1345                                            dnk_map  Web Map  ...   \n",
       "1410                                       erase_me_map  Web Map  ...   \n",
       "1411                                       erase_me_map  Web Map  ...   \n",
       "1412                                       erase_me_map  Web Map  ...   \n",
       "1413                                       erase_me_map  Web Map  ...   \n",
       "1414                                       erase_me_map  Web Map  ...   \n",
       "1415                                       erase_me_map  Web Map  ...   \n",
       "1462                                           Giraffes  Web Map  ...   \n",
       "1463                                  Giraffes Original  Web Map  ...   \n",
       "1465                           HIFLD Hospital Locations  Web Map  ...   \n",
       "1481                                   KG_Quick_Capture  Web Map  ...   \n",
       "1483                             Leaf Pickup Popup Test  Web Map  ...   \n",
       "1490                                    mult_lyr_webmap  Web Map  ...   \n",
       "1997                                 set1_cities_webmap  Web Map  ...   \n",
       "2263                     Time stamp: 2025_1_21_17_11_37  Web Map  ...   \n",
       "2265      Time stamp: 2025_1_21_17_11_37 Dispatcher Map  Web Map  ...   \n",
       "2266                     Time stamp: 2025_1_21_17_12_38  Web Map  ...   \n",
       "2268      Time stamp: 2025_1_21_17_12_38 Dispatcher Map  Web Map  ...   \n",
       "2269                     Time stamp: 2025_1_21_17_45_24  Web Map  ...   \n",
       "2271      Time stamp: 2025_1_21_17_45_24 Dispatcher Map  Web Map  ...   \n",
       "2272                     Time stamp: 2025_1_21_17_46_37  Web Map  ...   \n",
       "2273      Time stamp: 2025_1_21_17_46_37 Dispatcher Map  Web Map  ...   \n",
       "2275                     Time stamp: 2025_1_21_17_48_10  Web Map  ...   \n",
       "2276      Time stamp: 2025_1_21_17_48_10 Dispatcher Map  Web Map  ...   \n",
       "2277                      Time stamp: 2025_1_21_17_9_45  Web Map  ...   \n",
       "2279       Time stamp: 2025_1_21_17_9_45 Dispatcher Map  Web Map  ...   \n",
       "2281                     Time stamp: 2025_6_24_15_10_11  Web Map  ...   \n",
       "2282      Time stamp: 2025_6_24_15_10_11 Dispatcher Map  Web Map  ...   \n",
       "2283                     Time stamp: 2025_6_24_15_15_39  Web Map  ...   \n",
       "2285      Time stamp: 2025_6_24_15_15_39 Dispatcher Map  Web Map  ...   \n",
       "2286                      Time stamp: 2025_6_24_15_9_10  Web Map  ...   \n",
       "2288       Time stamp: 2025_6_24_15_9_10 Dispatcher Map  Web Map  ...   \n",
       "2293                                        UC Location  Web Map  ...   \n",
       "2294                                US Power Plant Data  Web Map  ...   \n",
       "2297           USA time zones and traffic counts WebMap  Web Map  ...   \n",
       "2305                                Vietnam for Testing  Web Map  ...   \n",
       "2310           Workforce-Ntgrtn-tst: 2025_6_25_11_29_25  Web Map  ...   \n",
       "2311  Workforce-Ntgrtn-tst: 2025_6_25_11_29_25 Dispa...  Web Map  ...   \n",
       "\n",
       "     apiToken1ExpirationDate apiToken2ExpirationDate contentOrigin  \\\n",
       "1147                      -1                      -1          self   \n",
       "1160                      -1                      -1          self   \n",
       "1345                      -1                      -1          self   \n",
       "1410                      -1                      -1          self   \n",
       "1411                      -1                      -1          self   \n",
       "1412                      -1                      -1          self   \n",
       "1413                      -1                      -1          self   \n",
       "1414                      -1                      -1          self   \n",
       "1415                      -1                      -1          self   \n",
       "1462                      -1                      -1          self   \n",
       "1463                      -1                      -1          self   \n",
       "1465                      -1                      -1          self   \n",
       "1481                      -1                      -1          self   \n",
       "1483                      -1                      -1          self   \n",
       "1490                      -1                      -1          self   \n",
       "1997                      -1                      -1          self   \n",
       "2263                      -1                      -1          self   \n",
       "2265                      -1                      -1          self   \n",
       "2266                      -1                      -1          self   \n",
       "2268                      -1                      -1          self   \n",
       "2269                      -1                      -1          self   \n",
       "2271                      -1                      -1          self   \n",
       "2272                      -1                      -1          self   \n",
       "2273                      -1                      -1          self   \n",
       "2275                      -1                      -1          self   \n",
       "2276                      -1                      -1          self   \n",
       "2277                      -1                      -1          self   \n",
       "2279                      -1                      -1          self   \n",
       "2281                      -1                      -1          self   \n",
       "2282                      -1                      -1          self   \n",
       "2283                      -1                      -1          self   \n",
       "2285                      -1                      -1          self   \n",
       "2286                      -1                      -1          self   \n",
       "2288                      -1                      -1          self   \n",
       "2293                      -1                      -1          self   \n",
       "2294                      -1                      -1          self   \n",
       "2297                      -1                      -1          self   \n",
       "2305                      -1                      -1          self   \n",
       "2310                      -1                      -1          self   \n",
       "2311                      -1                      -1          self   \n",
       "\n",
       "         lastViewed size commentsEnabled itemControl layers tables  \\\n",
       "1147  1750683600000  NaN             NaN         NaN    NaN    NaN   \n",
       "1160  1750683600000  NaN             NaN         NaN    NaN    NaN   \n",
       "1345  1756936800000  NaN             NaN         NaN    NaN    NaN   \n",
       "1410  1744761600000  NaN             NaN         NaN    NaN    NaN   \n",
       "1411  1744761600000  NaN             NaN         NaN    NaN    NaN   \n",
       "1412  1728936000000  NaN             NaN         NaN    NaN    NaN   \n",
       "1413  1728936000000  NaN             NaN         NaN    NaN    NaN   \n",
       "1414  1728936000000  NaN             NaN         NaN    NaN    NaN   \n",
       "1415  1728936000000  NaN             NaN         NaN    NaN    NaN   \n",
       "1462  1728936000000  NaN             NaN         NaN    NaN    NaN   \n",
       "1463  1754067600000  NaN             NaN         NaN    NaN    NaN   \n",
       "1465  1753286400000  NaN             NaN         NaN    NaN    NaN   \n",
       "1481  1744858800000  NaN             NaN         NaN    NaN    NaN   \n",
       "1483  1728936000000  NaN             NaN         NaN    NaN    NaN   \n",
       "1490  1744761600000  NaN             NaN         NaN    NaN    NaN   \n",
       "1997  1728936000000  NaN             NaN         NaN    NaN    NaN   \n",
       "2263  1753286400000  NaN             NaN         NaN    NaN    NaN   \n",
       "2265  1744761600000  NaN             NaN         NaN    NaN    NaN   \n",
       "2266  1750683600000  NaN             NaN         NaN    NaN    NaN   \n",
       "2268             -1  NaN             NaN         NaN    NaN    NaN   \n",
       "2269  1750683600000  NaN             NaN         NaN    NaN    NaN   \n",
       "2271  1750683600000  NaN             NaN         NaN    NaN    NaN   \n",
       "2272  1744761600000  NaN             NaN         NaN    NaN    NaN   \n",
       "2273             -1  NaN             NaN         NaN    NaN    NaN   \n",
       "2275  1744761600000  NaN             NaN         NaN    NaN    NaN   \n",
       "2276             -1  NaN             NaN         NaN    NaN    NaN   \n",
       "2277  1744761600000  NaN             NaN         NaN    NaN    NaN   \n",
       "2279  1744761600000  NaN             NaN         NaN    NaN    NaN   \n",
       "2281  1753286400000  NaN             NaN         NaN    NaN    NaN   \n",
       "2282  1750802400000  NaN             NaN         NaN    NaN    NaN   \n",
       "2283  1750802400000  NaN             NaN         NaN    NaN    NaN   \n",
       "2285  1750802400000  NaN             NaN         NaN    NaN    NaN   \n",
       "2286             -1  NaN             NaN         NaN    NaN    NaN   \n",
       "2288             -1  NaN             NaN         NaN    NaN    NaN   \n",
       "2293  1744761600000  NaN             NaN         NaN    NaN    NaN   \n",
       "2294  1752264000000  NaN             NaN         NaN    NaN    NaN   \n",
       "2297  1741903200000  NaN             NaN         NaN    NaN    NaN   \n",
       "2305  1754002800000  NaN             NaN         NaN    NaN    NaN   \n",
       "2310  1753286400000  NaN             NaN         NaN    NaN    NaN   \n",
       "2311  1750863600000  NaN             NaN         NaN    NaN    NaN   \n",
       "\n",
       "     contentStatus  \n",
       "1147           NaN  \n",
       "1160           NaN  \n",
       "1345           NaN  \n",
       "1410           NaN  \n",
       "1411           NaN  \n",
       "1412           NaN  \n",
       "1413           NaN  \n",
       "1414           NaN  \n",
       "1415           NaN  \n",
       "1462           NaN  \n",
       "1463           NaN  \n",
       "1465           NaN  \n",
       "1481           NaN  \n",
       "1483           NaN  \n",
       "1490           NaN  \n",
       "1997           NaN  \n",
       "2263           NaN  \n",
       "2265           NaN  \n",
       "2266           NaN  \n",
       "2268           NaN  \n",
       "2269           NaN  \n",
       "2271           NaN  \n",
       "2272           NaN  \n",
       "2273           NaN  \n",
       "2275           NaN  \n",
       "2276           NaN  \n",
       "2277           NaN  \n",
       "2279           NaN  \n",
       "2281           NaN  \n",
       "2282           NaN  \n",
       "2283           NaN  \n",
       "2285           NaN  \n",
       "2286           NaN  \n",
       "2288           NaN  \n",
       "2293           NaN  \n",
       "2294           NaN  \n",
       "2297           NaN  \n",
       "2305           NaN  \n",
       "2310           NaN  \n",
       "2311           NaN  \n",
       "\n",
       "[40 rows x 54 columns]"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "wm_item_df = owner_items_df.groupby(\"type\").get_group(\"Web Map\")\n",
    "wm_item_df"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "The resulting DataFrame's index uses the position value of each web map in the original dataframe for the row index, so we'll reset it to a zero-based index:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index([1147, 1160, 1345, 1410, 1411, 1412, 1413, 1414, 1415, 1462, 1463, 1465,\n",
       "       1481, 1483, 1490, 1997, 2263, 2265, 2266, 2268, 2269, 2271, 2272, 2273,\n",
       "       2275, 2276, 2277, 2279, 2281, 2282, 2283, 2285, 2286, 2288, 2293, 2294,\n",
       "       2297, 2305, 2310, 2311],\n",
       "      dtype='int64')"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "wm_item_df.index"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "web_maps = wm_item_df.reset_index(drop=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "RangeIndex(start=0, stop=40, step=1)"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "web_maps.index"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's retrieve a web map using a tag search so we can clone it into our target:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "def check_wm(tag_list):\n",
    "    return \"power_plants\" in tag_list"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "power_plant_df = web_maps[web_maps.tags.apply(check_wm)]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index([35], dtype='int64')"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "power_plant_df.index"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'6b1f7ea22e2543aa9849e34097d05570'"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "power_plant_df.loc[35].id"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div class=\"item_container\" style=\"height: auto; overflow: hidden; border: 1px solid #cfcfcf; border-radius: 2px; background: #f6fafa; line-height: 1.21429em; padding: 10px;\">\n",
       "                    <div class=\"item_left\" style=\"width: 210px; float: left;\">\n",
       "                       <a href='https://geosaurus.maps.arcgis.com/home/item.html?id=6b1f7ea22e2543aa9849e34097d05570' target='_blank'>\n",
       "                        <img src='' width='200' height='133' class=\"itemThumbnail\">\n",
       "                       </a>\n",
       "                    </div>\n",
       "\n",
       "                    <div class=\"item_right\"     style=\"float: none; width: auto; overflow: hidden;\">\n",
       "                        <a href='https://geosaurus.maps.arcgis.com/home/item.html?id=6b1f7ea22e2543aa9849e34097d05570' target='_blank'><b>US Power Plant Data</b>\n",
       "                        </a>\n",
       "                        <br/>Web Map of US Power Plant Data.<br/><img src='https://geosaurus.maps.arcgis.com/home/js/jsapi/esri/css/images/item_type_icons/maps16.png' style=\"vertical-align:middle;\" width=16 height=16>Web Map by ArcGISPyAPIBot\n",
       "                        <br/>Last Modified: February 20, 2024\n",
       "                        <br/>0 comments, 59 views\n",
       "                    </div>\n",
       "                </div>\n",
       "                "
      ],
      "text/plain": [
       "<Item title:\"US Power Plant Data\" type:Web Map owner:ArcGISPyAPIBot>"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "power_plant_wm_item = source.content.get(power_plant_df.loc[35].id)\n",
    "power_plant_wm_item"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's use the Map object to print information about each of the layers in the Web Map. We'll look at the layer name and the url, specifically paying attention to the beginning of the path componenet of the url, which contains the organization id of the host of the layer."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "wm_obj = Map(item=power_plant_wm_item)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Power_Plants\n",
      "  https://services7.arcgis.com/JEwYeAy2cc8qOe3o/arcgis/rest/services/US_Power_Plants/FeatureServer/0\n",
      "  Host Organization id: JEwYeAy2cc8qOe3o\n",
      "\n",
      "\n"
     ]
    }
   ],
   "source": [
    "for wm_lyr in wm_obj.content.layers:\n",
    "    print(f\"{wm_lyr.properties.name}\\n{' '*2}{wm_lyr.url}\")\n",
    "    print(f\"{' ' * 2}Host Organization id: {wm_lyr.url.split('/')[3]}\")\n",
    "    print(\"\\n\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Printing out our source organization id, we can see that the layer in the web map is hosted in the source."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "JEwYeAy2cc8qOe3o\n"
     ]
    }
   ],
   "source": [
    "print(f\"{source.properties.id}\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can use the `search_existing_items` parameter to handle how we want the items consumed in our `web map` to behave upon cloning. Given what we've learned about this parameter, we can rely on it to detect whether any of the `item ids` consumed in our web maps match any of the `typeKeywords` already existing in our _target_. If the function finds an existing item in the _target_, it will swizzle the appropriate values in the new `web map` definition. If the function does not find an existing item based on the `typeKeyword`, it will clone the `item`. For non-hosted items, it will recreate those items in the resulting `web map`. \n",
    "\n",
    "In this case, we'll set it to `False` since we know we've not cloned this web map before. We want any hosted layers to also clone in our _target_."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [],
   "source": [
    "cloned_wm = target.content.clone_items(items=[power_plant_wm_item],\n",
    "                                      folder=output_folder.name,\n",
    "                                      search_existing_items=False)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's examine the resulting items in the target:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<Item title:\"US Power Plants\" type:Feature Layer Collection owner:api_data_owner>,\n",
       " <Item title:\"US Power Plant Data\" type:Web Map owner:api_data_owner>]"
      ]
     },
     "execution_count": 22,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cloned_wm"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": [
    "cloned_wm_obj = Map(cloned_wm[1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "US Power Plants\n",
      "  https://pythonapi.playground.esri.com/server/rest/services/Hosted/US_Power_Plants/FeatureServer/0\n",
      "  Host Organization id: server\n",
      "\n",
      "\n"
     ]
    }
   ],
   "source": [
    "for wm_lyr in cloned_wm_obj.content.layers:\n",
    "    print(f\"{wm_lyr.properties.name}\\n{' '*2}{wm_lyr.url}\")\n",
    "    print(f\"{' ' * 2}Host Organization id: {wm_lyr.url.split('/')[3]}\")\n",
    "    print(\"\\n\")"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can see that `clone_items()` successfully recreated the web map and cloned the operational layer, and configured the resulting web map to use the cloned feature layer. We can see from the netscheme and path components of the layer URL that the resulting layer is using an ArcGIS Enterprise rather than an ArcGIS Online organization."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Let's visually compare our webmaps:\n",
    "\n",
    "#### source"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<img src=\"\"/>"
      ],
      "text/plain": [
       "<IPython.core.display.Image object>"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "wm_obj"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "#### target"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<img src=\"\"/>"
      ],
      "text/plain": [
       "<IPython.core.display.Image object>"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cloned_wm_obj"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "We can see visually that the maps appear to contain the same layers. You can repeat this process for any other `web map` _source_/_target_ pair from the `wm_map` dictionary to make a visual comparison."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### ArcGIS Dashboards and ArcGIS StoryMaps"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "See the [Cloning and Troubleshooting Complex Items](../cloning-complex-apps#dashboards-and-editing-item-data) guide for details on cloning ArcGIS Dashboards and ArcGIS StoryMaps. "
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Conclusion\n",
    "\n",
    "This guide demonstrated one workflow for cloning items between a _source_ Web GIS and a _target_ Web GIS.  We connected to each GIS as an administrator and cloned an individual item, and then a set of items. We then cloned a Web Map item, demonstrating how a hosted feature layer within the web map is also cloned and the cloned web map is configured to read the cloned feature layer which is hosted in the _target_ organization."
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.13.5"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
